home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Languages / Oberon⁄F™ 1.1 / Manuals / Language (.txt) < prev    next >
Encoding:
Oberon Document  |  1996-01-05  |  58.3 KB  |  711 lines  |  [oODC/obnF]

  1. Documents.StdDocumentDesc
  2. Documents.DocumentDesc
  3. Containers.ViewDesc
  4. Views.ViewDesc
  5. Stores.StoreDesc
  6. Documents.ModelDesc
  7. Containers.ModelDesc
  8. Models.ModelDesc
  9. Stores.ElemDesc
  10. TextViews.StdViewDesc
  11. TextViews.ViewDesc
  12. TextModels.StdModelDesc
  13. TextModels.ModelDesc
  14. TextModels.AttributesDesc
  15. Helvetica
  16. TextRulers.StdRulerDesc
  17. TextRulers.RulerDesc
  18. TextRulers.StdStyleDesc
  19. TextRulers.StyleDesc
  20. TextRulers.AttributesDesc
  21. StdLogos.ViewDesc
  22. Helvetica
  23. Helvetica
  24. Helvetica
  25. Helvetica
  26. Helvetica
  27. Helvetica
  28. Helvetica
  29. NF) is used to describe the syntax of Oberon/L: Alternatives are separated by |. Brackets [ and ] denote optionality of the enclosed expression, and braces { and } denote its repetition (possibly 0 times). Non-terminal symbols start with an upper-case letter (e.g. Statement). Terminal symbols either start with a lower-case letter (e.g. ident), or are written all in upper-case letters (e.g. BEGIN), or are denoted by strings (e.g. ":=").
  30. 3. Vocabulary and Representation
  31. The representation of (terminal) symbols in terms of characters is defined using the ASCII set. String
  32. literals,
  33. character
  34. constants,
  35. comments
  36. contain
  37. characters
  38. 8859-1,
  39. Latin-1
  40. extension
  41. ASCII
  42. character
  43. set. Symbols are identifiers, numbers, strings, operators, and delimiters. The following lexical rules must be observed: Blanks and line breaks must not occur within symbols (except in comments, and blanks in strings). They are ignored unless they are essential to separate two consecutive symbols. Capital and lower-case letters are considered as distinct.
  44. 1. Identifiers are sequences of letters and digits. The first character must be a letter.
  45. letter = "A" .. "Z" | "a" .. "z".
  46. ident = letter {letter | digit}.
  47. Examples:     x     Scan     Oberon2     GetSymbol     firstLetter
  48. 2. Numbers are (unsigned) integer or real constants. The type of an integer constant is the minimal type to which the constant value belongs (see 6.1). If the constant is specified with the suffix H, the representation is hexadecimal otherwise the representation is decimal.
  49.     A real number always contains a decimal point. Optionally it may also contain a decimal scale factor. The letter E (or D) means "times ten to the power of". A real number is of type REAL, unless it has a scale factor containing the letter D. In this case it is of type LONGREAL.
  50. number     = integer | real.
  51. integer     = digit {digit} | digit {hexDigit} "H".
  52. real     = digit {digit} "." {digit} [ScaleFactor].
  53. ScaleFactor     = ("E" | "D") ["+" | "-"] digit {digit}.
  54. hexDigit     = digit | "A" | "B" | "C" | "D" | "E" | "F".
  55. digit     = "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9".
  56. Examples:
  57. 1991    INTEGER    1991
  58. 0DH     SHORTINT    13
  59. 12.3    REAL    12.3
  60. 4.567E8     REAL    456700000
  61. 0.57712566D-6     LONGREAL    0.00000057712566
  62. 3. Character constants are denoted by the ordinal number of the character in hexadecimal notation followed by the letter X.
  63. character  = digit {hexDigit} "X".
  64. 4. Strings are sequences of characters enclosed in single (') or double (") quote marks. The opening quote must be the same as the closing quote and must not occur within the string. The number of characters in a string is called its length. A string of length 1 can be used wherever a character constant is allowed and vice versa.
  65. string  = ' " ' {char} ' " ' | " ' " {char} " ' ".
  66. Examples:     "Oberon/L"     "Don't worry!"     "x"
  67. 5. Operators and delimiters are the special characters, character pairs, or reserved words listed below. The reserved words consist exclusively of capital letters and cannot be used as identifiers.
  68.     +    :=    ARRAY    IMPORT    RETURN
  69.     -    ^    BEGIN    IN    THEN
  70.     *    =    BY    IS    TO
  71.     /    #    CASE    LOOP    TYPE
  72.     ~    <    CONST    MOD    UNTIL
  73.     &    >    DIV    MODULE    VAR
  74.     .    <=    DO    NIL    WHILE
  75.     ,    >=    ELSE    OF    WITH
  76.     ;    ..    ELSIF    OR
  77.     |    :    END    POINTER
  78.     (    )    EXIT    PROCEDURE
  79.     [    ]    FOR    RECORD
  80.     {    }    IF    REPEAT
  81. 6. Comments may be inserted between any two symbols in a program. They are arbitrary character sequences opened by the bracket (* and closed by *). Comments may be nested. They do not affect the meaning of a program.
  82. 4. Declarations and scope rules
  83. Every identifier occurring in a program must be introduced by a declaration, unless it is a predeclared identifier. Declarations also specify certain permanent properties of an object, such as whether it is a constant, a type, a variable, or a procedure. The identifier is then used to refer to the associated object. 
  84.     The scope of an object x extends textually from the point of its declaration to the end of the block (module, procedure, or record) to which the declaration belongs and hence to which the object is local. It excludes the scopes of equally named objects which are declared in nested blocks. The scope rules are:
  85.     1.     No identifier may denote more than one object within a given scope (i.e. no identifier 
  86.         may be declared twice in a block);
  87.     2.     An object may only be referenced within its scope;
  88.     3.     A type T of the form POINTER TO T1 (see 6.4) can be declared at a point where T1 is still 
  89.         unknown. The  declaration of T1 must follow in the same block to which T is local;
  90.     4.    Identifiers denoting record fields (see 6.3) or type-bound procedures (see 10.2) are valid 
  91.         in record designators only.
  92. An identifier declared in a module block may be followed by an export mark (" * " or " - ") in its declaration to indicate that it is exported. An identifier x exported by a module M may be used in other modules, if they import M (see Ch.11). The identifier is then denoted as M.x in these modules and is called a qualified identifier. Identifiers marked with " - " in their declaration are read-only in importing modules.
  93. Qualident        = [ident "."] ident.
  94. IdentDef        = ident [" * " | " - "].
  95. The following identifiers are predeclared; their meaning is defined in the indicated sections:
  96.     ABS    (10.3)    LEN    (10.3)
  97.     ASH    (10.3)    LONG    (10.3)
  98.     ASSERT    (10.3)    LONGINT    (6.1)
  99.     BOOLEAN    (6.1)    LONGREAL    (6.1)
  100.     CAP    (10.3)    MAX    (10.3)
  101.     CHAR    (6.1)    MIN    (10.3)
  102.     CHR    (10.3)    NEW    (10.3)
  103.     COPY    (10.3)    ODD    (10.3)
  104.     DEC    (10.3)    ORD    (10.3)
  105.     ENTIER    (10.3)    REAL    (6.1)
  106.     EXCL    (10.3)    SET    (6.1)
  107.     FALSE    (6.1)    SHORT    (10.3)
  108.     HALT    (10.3)    SHORTINT    (6.1)
  109.     INC    (10.3)    SIZE    (10.3)
  110.     INCL    (10.3)    TRUE    (6.1)
  111.     INTEGER    (6.1)
  112. 5. Constant declarations
  113. A constant declaration associates an identifier with a constant value.
  114. ConstantDeclaration     = IdentDef "=" ConstExpression.
  115. ConstExpression     = Expression.
  116. A constant expression is an expression that can be evaluated by a mere textual scan without actually executing the program. Its operands are constants (Ch.8) or predeclared functions (Ch.10.3) that can be evaluated at compile time. Examples of constant declarations are:
  117. N = 100
  118. limit = 2*N - 1
  119. fullSet = {MIN(SET) .. MAX(SET)}
  120. 6. Type declarations
  121. A data type determines the set of values which variables of that type may assume, and the operators that are applicable. A type declaration associates an identifier with a type. In the case of structured types (arrays and records) it also defines the structure of variables of this type. A structured type cannot contain itself.
  122. TypeDeclaration     = IdentDef "=" Type.
  123. Type     = Qualident | ArrayType | RecordType | PointerType | ProcedureType.
  124. Examples:
  125. Table = ARRAY N OF REAL
  126. Tree = POINTER TO Node
  127. Node =  RECORD
  128.     key : INTEGER;
  129.     left, right: Tree
  130. CenterTree = POINTER TO CenterNode
  131. CenterNode = RECORD (Node)
  132.     width: INTEGER;
  133.     subnode: Tree
  134. Function = PROCEDURE (x: INTEGER): INTEGER
  135. 6.1 Basic types
  136. The basic types are denoted by predeclared identifiers. The associated operators are defined in 8.2 and the predeclared function procedures in 10.3. The values of the given basic types are the following:
  137. 1.    BOOLEAN    the truth values TRUE and FALSE
  138. 2.    CHAR    the characters of the Latin-1
  139. character set (0X .. 0FFX)
  140. 3.    SHORTINT    the integers between MIN(SHORTINT) and MAX(SHORTINT)
  141. 4.    INTEGER    the integers between MIN(INTEGER) and MAX(INTEGER)
  142. 5.    LONGINT    the integers between MIN(LONGINT) and MAX(LONGINT)
  143. 6.    REAL    the real numbers between MIN(REAL) and MAX(REAL)
  144. 7.    LONGREAL    the real numbers between MIN(LONGREAL) and MAX(LONGREAL)
  145. 8.    SET    the sets of integers between 0 and MAX(SET)
  146. Types 3 to 5 are integer types, types 6 and 7 are real types, and together they are called numeric types. They form a hierarchy; the larger type includes (the values of) the smaller type:
  147.     LONGREAL  >=  REAL  >=  LONGINT  >=  INTEGER  >=  SHORTINT
  148. 6.2 Array types
  149. An array is a structure consisting of a number of elements which are all of the same type, called the element type. The number of elements of an array is called its length. The elements of the array are designated by indices, which are integers between 0 and the length minus 1.
  150. ArrayType     = ARRAY [Length {"," Length}] OF Type.
  151. Length         = ConstExpression.
  152. A type of the form
  153.     ARRAY L0, L1, ..., Ln OF T
  154. is understood as an abbreviation of
  155.     ARRAY L0 OF
  156.         ARRAY L1 OF
  157.         ...
  158.             ARRAY Ln OF T
  159. Arrays declared without length are called open arrays. They are restricted to pointer base types (see 6.4), element types of open array types, and formal parameter types (see 10.1). Examples:
  160.     ARRAY 10, N OF INTEGER
  161.     ARRAY OF CHAR
  162. 6.3 Record types
  163. A record type is a structure consisting of a fixed number of elements, called fields, with possibly different types. The record type declaration specifies the name and type of each field. The scope of the field identifiers extends from the point of their declaration to the end of the record type, but they are also visible within designators referring to elements of record variables (see 8.1). If a record type is exported, field identifiers that are to be visible outside the declaring module must be marked. They are called public fields; unmarked elements are called private fields.
  164. RecordType        = RECORD ["("BaseType")"] FieldList {";" FieldList} END.
  165. BaseType         = Qualident.
  166. FieldList         = [IdentList ":" Type].
  167. IdentList            = IdentDef {"," IdentDef}.
  168. Record types are extensible, i.e. a record type can be declared as an extension of another record type. In the example
  169.     T0 = RECORD x: INTEGER END
  170.     T1 = RECORD (T0) y: REAL END
  171. T1 is a (direct) extension of T0 and T0 is the (direct) base type of T1 (see App. A). An extended type T1 consists of the fields of its base type and of the fields which are declared in T1. All identifiers declared in the extended record must be different from the identifiers declared in its base type record(s).
  172. Examples of record type declarations:
  173. RECORD
  174.     day, month, year: INTEGER
  175. RECORD
  176.     name, firstname: ARRAY 32 OF CHAR;
  177.     age: INTEGER;
  178.     salary: REAL
  179. 6.4 Pointer types
  180. Variables of a pointer type P assume as values pointers to variables of some type T. T is called the pointer base type of P and must be a record or array type. Pointer types adopt the extension relation of their pointer base types: if a type T1 is an extension of T, and P1 is of type POINTER TO T1, then P1 is also an extension of P.
  181.     PointerType = POINTER TO Type.
  182. If p is a variable of type P = POINTER TO T, a call of the predeclared procedure NEW(p) (see 10.3) allocates a variable of type T in free storage. If T is a record type or an array type with fixed length, the allocation has to be done with NEW(p); if T is an n-dimensional open array type the allocation has to be done with NEW(p, e0, ..., en-1) where T is allocated with lengths given by the expressions e0, ..., en-1. In either case a pointer to the allocated variable is assigned to p. p is of type P. The referenced  variable p^ (pronounced as p-referenced) is of type T. Any pointer variable may assume the value NIL, which points to no variable at all.
  183. 6.5 Procedure types
  184. Variables of a procedure type T have a procedure (or NIL) as value. If a procedure P is assigned to a variable of type T, the formal parameter lists (see Ch. 10.1) of P and T must match (see App. A). P must not be a predeclared or type-bound procedure nor may it be local to another procedure.
  185.     ProcedureType = PROCEDURE [FormalParameters].
  186. 7. Variable declarations
  187. Variable declarations introduce variables by defining an identifier and a data type for them.
  188.     VariableDeclaration = IdentList ":" Type.
  189. Record and pointer variables have both a static type (the type with which they are declared - simply called their type) and a dynamic type (the type of their value at run time). For pointers and variable parameters of record type the dynamic type may be an extension of their static type. The static type determines which fields of a record are accessible. The dynamic type is used to call type-bound procedures (see 10.2).
  190. Examples of variable declarations (refer to examples in Ch. 6):
  191. i, j, k: INTEGER
  192. x, y: REAL
  193. p, q: BOOLEAN
  194. s: SET
  195. F: Function
  196. a: ARRAY 100 OF REAL
  197. w: ARRAY 16 OF
  198.     RECORD
  199.         name: ARRAY 32 OF CHAR;
  200.         count: INTEGER
  201. t, c: Tree
  202. 8. Expressions
  203. Expressions are constructs denoting rules of computation whereby constants and current values of variables are combined to compute other values by the application of operators and function procedures. Expressions consist of operands and operators. Parentheses may be used to express specific associations of operators and operands.
  204. 8.1 Operands
  205. With the exception of set constructors and literal constants (numbers, character constants, or strings), operands are denoted by designators. A designator consists of an identifier referring to a constant, variable, or procedure. This identifier may possibly be qualified by a module identifier (see Ch. 4 and 11) and may be followed by selectors if the designated object is an element of a structure.
  206. Designator     = Qualident {"." ident | "[" ExpressionList "]" | "^" | "(" Qualident ")"}.
  207. ExpressionList     = Expression {"," Expression}.
  208. If a designates an array, then a[e] denotes that element of a whose index is the current value of the expression e. The type of e must be an integer type. A designator of the form a[e0, e1, ..., en] stands for a[e0][e1]...[en]. If r designates a record, then r.f denotes the field f of r or the procedure f bound to the dynamic type of r (Ch. 10.2). If p designates a pointer, p^ denotes the variable which is referenced by p. The designators p^.f and p^[e] may be abbreviated as p.f and p[e], i.e. record and array selectors imply dereferencing. If a or r are read-only, then also a[e] and r.f are read-only. 
  209.     A type guard v(T) asserts that the dynamic type of v is T (or an extension of T), i.e. program execution is aborted, if the dynamic type of v is not T (or an extension of T). Within the designator, v is then regarded as having the static type T. The guard is applicable, if
  210.     1.  v is a variable parameter of record type or v is a pointer, and if
  211.     2.  T is an extension of the static type of v
  212. If the designated object is a constant or a variable, then the designator refers to its current value. If it is a procedure, the designator refers to that procedure unless it is followed by a (possibly empty) parameter list in which case it implies an activation of that procedure and stands for the value resulting from its execution. The actual parameters must correspond to the formal parameters as in proper procedure calls (see 10.1).
  213. Examples of designators (refer to examples in Ch.7):
  214. i    (INTEGER)
  215. a[i]    (REAL)
  216. w[3].name[i]    (CHAR)
  217. t.left.right    (Tree)
  218. t(CenterTree).subnode    (Tree)
  219. 8.2 Operators
  220. Four classes of operators with different precedences (binding strengths) are syntactically distinguished in expressions. The operator ~ has the highest precedence, followed by multiplication operators, addition operators, and relations. Operators of the same precedence associate from left to right. For example, x-y-z stands for (x-y)-z.
  221. Expression     = SimpleExpression [Relation SimpleExpression].
  222. SimpleExpression    = ["+" | "-"] Term {AddOperator Term}.
  223. Term     = Factor {MulOperator Factor}.
  224. Factor     = Designator [ActualParameters] | 
  225.         number | character | string | NIL | Set | "(" Expression ")" | "~" Factor.
  226. Set     = "{" [Element {"," Element}] "}".
  227. Element     = Expression [".." Expression].
  228. ActualParameters     = "(" [ExpressionList] ")".
  229. Relation     = "=" | "#" | "<" | "<=" | ">" | ">=" | IN | IS.
  230. AddOperator     = "+" | "-" | OR.
  231. MulOperator     = "*" | "/" | DIV | MOD | "&".
  232. The available operators are listed in the following tables. Some operators are applicable to operands of various types, denoting different operations. In these cases, the actual operation is identified by the type of the operands. The operands must be expression compatible with respect to the operator (see App. A).
  233. 8.2.1 Logical operators
  234. OR    logical disjunction     p OR q      "if p then TRUE, else q"
  235. &    logical conjunction     p & q      "if p then q, else FALSE"
  236. ~    negation     ~ p      "not p"
  237. These operators apply to BOOLEAN operands and yield a BOOLEAN result.
  238. 8.2.2 Arithmetic operators
  239. +    sum
  240. -    difference
  241. *    product
  242. /    real quotient
  243. DIV    integer quotient
  244. MOD    modulus
  245. The operators +, -, *, and / apply to operands of numeric types. The type of the result is the type of that operand which includes the type of the other operand, except for division (/), where the result is the smallest real type which includes both operand types. When used as monadic operators, - denotes sign inversion and + denotes the identity operation. The operators DIV and MOD apply to integer operands only. They are related by the following formulas:
  246. x = (x DIV y) * y + (x MOD y)
  247. 0 <= (x MOD y) < y  or
  248. Note:
  249. ENTIER(x
  250. Examples:
  251.  x     y    x DIV y    x MOD y
  252.  5     3       1              2
  253. -5     3      -2              1
  254.  5    -3      -2             -1
  255. -5    -3       1             -2
  256. 8.2.3 Set Operators
  257. +    union
  258. -    difference (x - y = x * (-y))
  259. *    intersection
  260. /    symmetric set difference (x / y = (x-y) + (y-x))
  261. Set operators apply to operands of type SET and yield a result of type SET. The monadic minus sign denotes the complement of x, i.e. -x denotes the set of integers between 0 and MAX(SET) which are not elements of x. Set operators are not associative ((a+b)-c # a+(b-c)).
  262. A set constructor defines the value of a set by listing its elements between curly brackets. The elements must be integers in the range 0..MAX(SET). A range a..b denotes all integers i
  263. with i
  264. 8.2.4 Relations
  265. =    equal
  266. #    unequal
  267. <    less
  268. <=    less or equal
  269. >    greater
  270. >=    greater or equal
  271. IN    set membership
  272. IS    type test
  273. Relations yield a BOOLEAN result. The relations =, #, <, <=, >, and >= apply to the numeric types, CHAR, strings, and character arrays containing 0X as a terminator. The relations = and # also apply to BOOLEAN and SET, as well as to pointer and procedure types (including the value NIL). x IN s stands for "x is an element of s". x must be of an integer type, and s of type SET. v IS T stands for "the dynamic type of v is T (or an extension of T)" and is called a type test. It is applicable if
  274. 1.  v is a variable parameter of record type or v is a pointer, and if
  275. 2.  T is an extension of the static type of v
  276. Examples of expressions (refer to examples in Ch.7):
  277. 1991    INTEGER
  278. i DIV 3    INTEGER
  279. ~p OR q    BOOLEAN
  280. (i+j) * (i-j)    INTEGER
  281. s - {8, 9, 13}    SET
  282. i + x    REAL
  283. a[i+j] * a[i-j]    REAL
  284. (0<=i) & (i<100)    BOOLEAN
  285. t.key = 0    BOOLEAN
  286. k IN {i..j-1}    BOOLEAN
  287. w[i].name <= "John"    BOOLEAN
  288. t IS CenterTree    BOOLEAN
  289. 9. Statements
  290. Statements denote actions. There are elementary and structured statements. Elementary statements are not composed of any parts that are themselves statements. They are the assignment, the procedure call, the return, and the exit statement. Structured statements are composed of parts that are themselves statements. They are used to express sequencing and conditional, selective, and repetitive execution. A statement may also be empty, in which case it denotes no action. The empty statement is included in order to relax punctuation rules in statement sequences.
  291.     Statement =    [ Assignment | ProcedureCall | IfStatement | CaseStatement |
  292.         WhileStatement | RepeatStatement |
  293.         ForStatement | LoopStatement | WithStatement | EXIT | RETURN [Expression] ].
  294. 9.1 Assignments
  295. Assignments replace the current value of a variable by a new value specified by an expression. The expression must be assignment compatible with the variable (see App. A). The assignment operator is written as ":=" and pronounced as becomes.
  296.     Assignment = Designator ":=" Expression.
  297. If an expression e of type Te is assigned to a variable v of type Tv, the following happens:
  298.     1.     if Tv and Te are record types, only those fields of Te are assigned which also belong to
  299.         Tv (projection); the dynamic type of v  must be the same as the static type of v and  is
  300.         not changed by the assignment;
  301.     2.    if Tv and Te are pointer types, the dynamic type of v becomes the dynamic type of e;
  302.     3.    if Tv is ARRAY n OF CHAR and e is a string of length m<n, v[i] becomes ei for i = 0..m-1
  303.         and v[m] becomes 0X.
  304. Examples of assignments (refer to examples in Ch.7):
  305. i := 0
  306. p := i = j
  307. x := i + 1
  308. k := log2(i+j)
  309. F := log2        (* see 10.1 *)
  310. s := {2, 3, 5, 7, 11, 13}
  311. a[i] := (x+y) * (x-y)
  312. t.key := i
  313. w[i+1].name := "John"
  314. t := c
  315. 9.2 Procedure calls
  316. A procedure call activates a procedure. It may contain a list of actual parameters which replace the corresponding formal parameters defined in the procedure declaration (see Ch. 10). The correspondence is established by the positions of the parameters in the actual and formal parameter lists. There are two kinds of parameters: variable and value parameters.
  317.     If a formal parameter is a variable parameter, the corresponding actual parameter must be a designator denoting a variable. If it denotes an element of a structured variable, the component selectors are evaluated when the formal/actual parameter substitution takes place, i.e. before the execution of the procedure. If a formal parameter is a value parameter, the corresponding actual parameter must be an expression. This expression is evaluated before the procedure activation, and the resulting value is assigned to the formal parameter (see also 10.1).
  318.     ProcedureCall = Designator [ActualParameters].
  319. Examples:
  320. WriteInt(i*2+1)    (* see 10.1 *)
  321. INC(w[k].count)
  322. t.Insert("John")    (* see 11 *)
  323. 9.3 Statement sequences
  324. Statement sequences denote the sequence of actions specified by the component statements which are separated by semicolons.
  325.     StatementSequence = Statement {";" Statement}.
  326. 9.4 If statements
  327.     IfStatement = 
  328.         IF Expression THEN StatementSequence
  329.         {ELSIF Expression THEN StatementSequence}
  330.         [ELSE StatementSequence]
  331.         END.
  332. If statements specify the conditional execution of guarded statement sequences. The Boolean expression preceding a statement sequence is called its guard. The guards are evaluated in sequence of occurrence, until one evaluates to TRUE, whereafter its associated statement sequence is executed. If no guard is satisfied, the statement sequence following the symbol ELSE is executed, if there is one.
  333. Example:
  334. IF (ch >= "A") & (ch <= "Z") THEN ReadIdentifier
  335. ELSIF (ch >= "0") & (ch <= "9") THEN ReadNumber
  336. ELSIF (ch = " ' ") OR (ch = ' " ') THEN ReadString
  337. ELSE SpecialCharacter
  338. 9.5 Case statements
  339. Case statements specify the selection and execution of a statement sequence according to the value of an expression. First the case expression is evaluated, then that statement sequence is executed whose case label list contains the obtained value. The case expression must either be of an integer type that includes the types of all case labels, or both the case expression and the case labels must be of type CHAR. Case labels are constants, and no value must occur more than once. If the value of the expression does not occur as a label of any case, the statement sequence following the symbol ELSE is selected, if there is one, otherwise the program is aborted.
  340. CaseStatement     = CASE Expression OF Case {"|" Case} [ELSE StatementSequence] END.
  341. Case     = [CaseLabelList ":" StatementSequence].
  342. CaseLabelList     = CaseLabels {"," CaseLabels}.
  343. CaseLabels     = ConstExpression [".." ConstExpression].
  344. Example:
  345. CASE ch OF
  346.     "A" .. "Z": ReadIdentifier 
  347. |    "0" .. "9": ReadNumber 
  348. |    " ' ", ' " ': ReadString
  349. ELSE SpecialCharacter
  350. 9.6 While statements
  351. While statements specify the repeated execution of a statement sequence while the Boolean expression (its guard) yields TRUE. The guard is checked before every execution of the statement sequence.
  352.     WhileStatement = WHILE Expression DO StatementSequence END.
  353. Examples:
  354. WHILE i > 0 DO i := i DIV 2; k := k + 1 END
  355. WHILE (t # NIL) & (t.key # i) DO t := t.left END
  356. 9.7 Repeat statements
  357. A repeat statement specifies the repeated execution of a statement sequence until a condition specified by a Boolean expression is satisfied. The statement sequence is executed at least once.
  358.     RepeatStatement = REPEAT StatementSequence UNTIL Expression.
  359. 9.8 For statements
  360. A for statement specifies the repeated execution of a statement sequence while a progression of values is assigned to an integer variable called the control variable of the for statement.
  361.     ForStatement =
  362.         FOR ident ":=" Expression TO Expression [BY ConstExpression]
  363.         DO StatementSequence END.
  364. The statement
  365.     FOR v := beg TO end BY step DO statements END
  366. is equivalent to
  367. temp := end; v := beg;
  368. IF step > 0 THEN
  369.     WHILE v <= temp DO statements; v := v + step END
  370.     WHILE v >= temp DO statements; v := v + step END
  371. temp has the same type as v. step must be a nonzero constant expression. If step is not specified, it is assumed to be 1.
  372. Examples:
  373. FOR i := 0 TO 79 DO k := k + a[i] END
  374. FOR i := 79 TO 1 BY -1 DO a[i] := a[i-1] END
  375. 9.9 Loop statements
  376. A loop statement specifies the repeated execution of a statement sequence. It is terminated upon execution of an exit statement within that sequence (see 9.10).
  377.     LoopStatement = LOOP StatementSequence END.
  378. Example:
  379.     ReadInt(i);
  380.     IF i < 0 THEN EXIT END;
  381.     WriteInt(i)
  382. Loop statements are useful to express repetitions with several exit points or cases where the exit condition is in the middle of the repeated statement sequence.
  383. 9.10 Return and exit statements
  384. A return statement indicates the termination of a procedure. It is denoted by the symbol RETURN, followed by an expression if the procedure is a function procedure. The type of the expression must be assignment compatible (see App. A) with the result type specified in the procedure heading (see Ch.10).
  385.     Function procedures require the presence of a return statement indicating the result value. In proper procedures, a return statement is implied by the end of the procedure body. Any explicit return statement therefore appears as an additional (probably exceptional) termination point.
  386.     An exit statement is denoted by the symbol EXIT. It specifies termination of the enclosing loop statement and continuation with the statement following that loop statement. Exit statements are contextually, although not syntactically associated with the loop statement which contains them.
  387. 9.11 With statements
  388. With statements execute a statement sequence depending on the result of a type test and apply a type guard to every occurrence of the tested variable within this statement sequence.
  389. WithStatement     = WITH Guard DO StatementSequence {"|" Guard DO StatementSequence}
  390.         [ELSE StatementSequence] END.
  391. Guard    = Qualident ":" Qualident.
  392. If v is a variable parameter of record type or a pointer variable, and if it is of a static type T0, the statement
  393.     WITH v: T1 DO S1 | v: T2 DO S2 ELSE S3 END
  394. has the following meaning: if the dynamic type of v is T1, then the statement sequence S1 is executed where v is regarded as if it had the static type T1; else if the dynamic type of v is T2, then S2 is executed where v is regarded as if it had the static type T2; else S3 is executed. T1 and T2 must be extensions of T0. If no type test is satisfied and if an else clause is missing the program is aborted.
  395. Example:
  396. WITH t: CenterTree DO i := t.width; c := t.subnode END
  397. 10. Procedure declarations
  398. A procedure declaration consists of a procedure heading and a procedure body. The heading specifies the procedure identifier and the formal parameters. For type-bound procedures it also specifies the receiver parameter. The body contains declarations and statements. The procedure identifier is repeated at the end of the procedure declaration.
  399.     There are two kinds of procedures: proper procedures and function procedures. The latter are activated by a function designator as a constituent of an expression and yield a result that is an operand of the expression. Proper procedures are activated by a procedure call. A procedure is a function procedure if its formal parameters specify a result type. The body of a function procedure must contain a return statement which defines its result.
  400.     All constants, variables, types, and procedures declared within a procedure body are local to the procedure. Since procedures may be declared as local objects too, procedure declarations may be nested. The call of a procedure within its declaration implies recursive activation.
  401.     Objects declared in the environment of the procedure are also visible in those parts of the procedure in which they are not concealed by a locally declared object with the same name.
  402. ProcedureDeclaration    = ProcedureHeading ";" ProcedureBody ident.
  403. ProcedureHeading     = PROCEDURE [Receiver] IdentDef [FormalParameters].
  404. ProcedureBody     = DeclarationSequence [BEGIN StatementSequence] END.
  405. DeclarationSequence     = {CONST {ConstantDeclaration ";"} | TYPE {TypeDeclaration ";"} |
  406.         VAR {VariableDeclaration ";"} }
  407.         {ProcedureDeclaration ";" | ForwardDeclaration ";"}.
  408. ForwardDeclaration     = PROCEDURE " ^ " [Receiver] IdentDef [FormalParameters].
  409. If a procedure declaration specifies a receiver parameter, the procedure is considered to be bound to a type (see 10.2). A forward declaration serves to allow forward references to a procedure whose actual declaration appears later in the text. The formal parameter lists of the forward declaration and the actual declaration must match (see App. A).
  410. 10.1 Formal parameters
  411. Formal parameters are identifiers declared in the formal parameter list of a procedure. They correspond to actual parameters specified in the procedure call. The correspondence between formal and actual parameters is established when the procedure is called. There are two kinds of parameters, value and variable parameters, indicated in the formal parameter list by the absence or presence of the keyword VAR. Value parameters are local variables to which the value of the corresponding actual parameter is assigned as an initial value. Variable parameters correspond to actual parameters that are variables, and they stand for these variables. The scope of a formal parameter extends from its declaration to the end of the procedure block in which it is declared. A function procedure without parameters must have an empty parameter list. It must be called by a function designator whose actual parameter list is empty too. The result type of a procedure can be neither a record nor an array.
  412. FormalParameters    = "(" [FPSection {";" FPSection}] ")" [":" Qualident].
  413. FPSection     = [VAR] ident {"," ident} ":" Type.
  414. Let Tf be the type of a formal parameter f (not an open array) and Ta the type of the corresponding actual parameter a. For variable parameters, Ta must be the same as Tf, or Tf must be a record type and Ta an extension of Tf. For value parameters, a must be assignment compatible with f (see App. A).
  415.     If Tf is an open array , then a must be array compatible with f (see App. A). The lengths of f are taken from a.
  416. Examples of procedure declarations:
  417. PROCEDURE ReadInt (VAR x: INTEGER);
  418.     VAR i: INTEGER; ch: CHAR;
  419. BEGIN
  420.     i := 0; Read(ch);
  421.     WHILE ("0" <= ch) & (ch <= "9") DO
  422.         i := 10*i + (ORD(ch)-ORD("0")); Read(ch)
  423.     END;
  424.     x := i
  425. END ReadInt
  426. PROCEDURE WriteInt (x: INTEGER);    (*0 <= x <100000*)
  427.     VAR i: INTEGER; buf: ARRAY 5 OF INTEGER;
  428. BEGIN
  429.     i := 0;
  430.     REPEAT buf[i] := x MOD 10; x := x DIV 10; INC(i) UNTIL x = 0;
  431.     REPEAT DEC(i); Write(CHR(buf[i] + ORD("0"))) UNTIL i = 0
  432. END WriteInt
  433. PROCEDURE WriteString (s: ARRAY OF CHAR);
  434.     VAR i: INTEGER;
  435. BEGIN
  436.     i := 0; WHILE (i < LEN(s)) & (s[i] # 0X) DO Write(s[i]); INC(i) END
  437. END WriteString;
  438. PROCEDURE log2 (x: INTEGER): INTEGER;
  439.     VAR y: INTEGER;    (*assume x>0*)
  440. BEGIN
  441.     y := 0; WHILE x > 1 DO x := x DIV 2; INC(y) END;
  442.     RETURN y
  443. END log2
  444. 10.2 Type-bound procedures
  445. Globally declared procedures may be associated with a record type declared in the same module. The procedures are said to be bound to the record type. The binding is expressed by the type of the receiver in the heading of a procedure declaration.  The receiver may be either a variable parameter of record type T or a value parameter of type POINTER TO T (where T is a record type). The procedure is bound to the type T and is considered local to it.
  446. ProcedureHeading    = PROCEDURE [Receiver] IdentDef [FormalParameters].
  447. Receiver     = "(" [VAR] ident ":" ident ")".
  448. If a procedure P is bound to a type T0, it is implicitly also bound to any type T1 which is an extension of T0. However, a procedure P' (with the same name as P) may be explicitly bound to T1 in which case it overrides the binding of P. P' is considered a redefinition of P for T1. The formal parameters of P and P' must match (see App. A),
  449. except
  450. function
  451. procedure returning
  452. pointer
  453. type.
  454. latter
  455. case,
  456. function
  457. result
  458. extension of
  459. function
  460. result
  461. (covariance). If P and T1 are exported (see Chapter 4) P' must be exported too.
  462.     If v is a designator and P is a type-bound procedure, then v.P denotes that procedure P which is bound to the dynamic type of v. Note, that this may be a different procedure than the one bound to the static type of v. v is passed to P's receiver according to the parameter passing rules specified in Chapter 10.1.
  463.     If r is a receiver parameter declared with type T, r.P^ denotes the (redefined) procedure P bound to the base type of T.
  464. In a forward declaration of a type-bound procedure the receiver parameter must be of the same type as in the actual procedure declaration. The formal parameter lists of both declarations must match (App. A).
  465. Examples:
  466. PROCEDURE (t: Tree) Insert (node: Tree);
  467.     VAR p, father: Tree;
  468. BEGIN p := t;
  469.     REPEAT father := p;
  470.         IF node.key = p.key THEN RETURN END;
  471.         IF node.key < p.key THEN p := p.left ELSE p := p.right END
  472.     UNTIL p = NIL;
  473.     IF node.key < father.key THEN father.left := node ELSE father.right := node END;
  474.     node.left := NIL; node.right := NIL
  475. END Insert;
  476. PROCEDURE (t: CenterTree) Insert (node: Tree);  (*redefinition*)
  477. BEGIN
  478.     WriteInt(node(CenterTree).width);
  479.     t.Insert^ (node)  (* calls the Insert procedure bound to Tree *)
  480. END Insert;
  481. 10.3 Predeclared procedures
  482. The following table lists the predeclared procedures. Some are generic procedures, i.e. they apply to several types of operands. v stands for a variable, x and n for expressions, and T for a type.
  483. Function procedures
  484. Name    Argument type    Result type    Function
  485. ABS(x)    numeric type    type of x    absolute value
  486. ASH(x, n)    x, n: integer type    LONGINT    arithmetic shift (x * 2n)
  487. CAP(x)    CHAR    CHAR    x is letter: corresponding capital letter
  488. CHR(x)    integer type    CHAR    character with ordinal number x
  489. ENTIER(x)    real type    LONGINT    largest integer not greater than x
  490. LEN(v, n)    v: array; n: integer constant    LONGINT    length of v in dimension n
  491.             (first dimension = 0)
  492. LEN(v)    v: array    LONGINT    equivalent to LEN(v, 0)
  493. LONG(x)    SHORTINT    INTEGER    identity
  494.     INTEGER    LONGINT
  495.     REAL    LONGREAL
  496. MAX(T)    T = basic type    T    maximum value of type T
  497.     T = SET    INTEGER    maximum element of a set
  498. MIN(T)    T = basic type    T    minimum value of type T
  499.     T = SET    INTEGER    0
  500. ODD(x)    integer type    BOOLEAN    x MOD 2 = 1
  501. ORD(x)    CHAR    INTEGER    ordinal number of x
  502. SHORT(x)    LONGINT    INTEGER    identity
  503.     INTEGER    SHORTINT    identity
  504.     LONGREAL    REAL    identity (truncation possible)
  505. SIZE(T)    any type    integer type    number of bytes required by T
  506. Proper procedures
  507. Name    Argument types    Function
  508. ASSERT(x)    x: Boolean expression    terminate program execution if not x
  509. ASSERT(x, n)    x: Boolean expression; n: integer constant
  510.         terminate program execution if not x
  511. COPY(x, v)    x: character array, string; v: character array    v := x
  512. DEC(v)    integer type    v := v - 1
  513. DEC(v, n)    v, n: integer type    v := v - n
  514. EXCL(v, x)    v: SET; x: integer type    v := v - {x}
  515. HALT(n)    integer constant    terminate program execution
  516. INC(v)    integer type    v := v + 1
  517. INC(v, n)    v, n: integer type    v := v + n
  518. INCL(v, x)    v: SET; x: integer type    v := v + {x}
  519. NEW(v)    pointer to record or fixed array    allocate v ^
  520. NEW(v, x0, ..., xn    v: pointer to open array; xi: integer type
  521.         allocate v ^ with lengths x0.. xn
  522. COPY allows the assignment of a string or a character array containing a terminating 0X to another character array. If necessary, the assigned value is truncated to the target length minus one. The target will always contain 0X as a terminator. In ASSERT(x, n) and HALT(n), the interpretation of n is left to the underlying system implementation.
  523. 11. Modules
  524. A module is a collection of declarations of constants, types, variables, and procedures, together with a sequence of statements for the purpose of assigning initial values to the variables. A module constitutes a text that is compilable as a unit.
  525. Module    = MODULE ident ";" [ImportList] DeclarationSequence [BEGIN StatementSequence] END ident ".".
  526. ImportList    = IMPORT Import {"," Import} ";".
  527. Import     = [ident ":="] ident.
  528. The import list specifies the names of the imported modules. If a module A is imported by a module M and A exports an identifier x, then x is referred to as A.x within M. If A is imported as B := A, the object x must be referenced as B.x. This allows short alias names in qualified identifiers. A module must not import itself. Identifiers that are to be exported (i.e. that are to be visible in client modules) must be marked by an export mark in their declaration (see Chapter 4).
  529.     The statement sequence following the symbol BEGIN is executed when the module is added to a system (loaded), which is done after the imported modules have been loaded. It follows that cyclic import of modules is illegal. Individual (parameterless and exported) procedures can be activated from the system, and these procedures serve as commands (see Appendix D1).
  530. Example:
  531. MODULE Trees;     (* exports: Tree, Node, Insert, Search, Write, Init *)
  532.     IMPORT Out;
  533.     TYPE
  534.         Tree* = POINTER TO Node;
  535.         Node* = RECORD    (* exports read-only: Node.name *)
  536.             name-: POINTER TO ARRAY OF CHAR;
  537.             left, right: Tree
  538.         END;
  539.     PROCEDURE (t: Tree) Insert* (name: ARRAY OF CHAR);
  540.         VAR p, father: Tree;
  541.     BEGIN
  542.         p := t;
  543.         REPEAT father := p;
  544.             IF name = p.name^ THEN RETURN END;
  545.             IF name < p.name^ THEN p := p.left ELSE p := p.right END
  546.         UNTIL p = NIL;
  547.         NEW(p); p.left := NIL; p.right := NIL;
  548.         NEW(p.name, LEN(name)+1); COPY(name, p.name^);
  549.         IF name < father.name^ THEN father.left := p ELSE father.right := p END
  550.     END Insert;
  551.     PROCEDURE (t: Tree) Search* (name: ARRAY OF CHAR): Tree;
  552.         VAR p: Tree;
  553.     BEGIN
  554.         p := t;
  555.         WHILE (p # NIL) & (name # p.name^) DO
  556.             IF name < p.name^ THEN p := p.left ELSE p := p.right END
  557.         END;
  558.         RETURN p
  559.     END Search;
  560.     PROCEDURE (t: Tree) Write*;
  561.     BEGIN
  562.         IF t.left # NIL THEN t.left.Write END;
  563.         Out.String(t.name^); Out.Ln;
  564.         IF t.right # NIL THEN t.right.Write END
  565.     END Write;
  566.     PROCEDURE Init* (t: Tree);
  567.     BEGIN
  568.         NEW(t.name, 1); t.name[0] := 0X; t.left := NIL; t.right := NIL
  569.     END Init;
  570. BEGIN
  571.     Out.String("Trees"); Out.Ln
  572. END Trees.
  573. Appendix A: Definition of terms
  574. Integer types    SHORTINT, INTEGER, LONGINT
  575. Real types    REAL, LONGREAL
  576. Numeric types    integer types, real types
  577. Same types
  578. Two variables a and b with types Ta and Tb are of the same type if
  579. 1.  Ta and Tb are both denoted by the same type identifier, or
  580. 2.  Ta is declared to equal Tb in a type declaration of the form Ta = Tb, or
  581. 3.  a and b appear in the same identifier list in a variable, record field, or formal parameter
  582.     declaration and are not open arrays.
  583. Equal types
  584. Two types Ta and Tb are equal if
  585. 1.  Ta and Tb are the same type,  or
  586. 2.  Ta and Tb are open array types with equal element types, or
  587. 3.  Ta and Tb are procedure types whose formal parameter lists match.
  588. Type inclusion
  589. Numeric types include (the values of) smaller numeric types according to the following hierarchy:
  590.     LONGREAL >= REAL >= LONGINT >= INTEGER >= SHORTINT
  591. Type extension (base type)
  592. Given a type declaration Tb = RECORD (Ta) ... END, Tb is a direct extension of Ta, and Ta is a direct base type of Tb. A type Tb is an extension of a type Ta (Ta is a base type of Tb) if
  593. 1.  Ta and Tb are the same types, or
  594. 2.  Tb is a direct extension of an extension of Ta
  595.     If Pa = POINTER TO Ta and Pb = POINTER TO Tb, Pb is an extension of Pa
  596.      (Pa is a base type of Pb) if Tb is an extension of Ta.
  597. Assignment compatible
  598. An expression e of type Te is assignment compatible with a variable v of type Tv if one of the following conditions hold:
  599. 1.  Te and Tv are the same type;
  600. 2.  Te and Tv are numeric types and Tv includes Te;
  601. 3.  Te and Tv are record types and Te is an extension of Tv and the dynamic type of v is Tv ;
  602. 4.  Te and Tv are pointer types and Te is an extension of Tv;
  603. 5.  Tv is a pointer or a procedure type and e is NIL;
  604. 6.  Tv is ARRAY n OF CHAR, e is a string constant with m characters, and m < n;
  605. 7.  Tv is a procedure type and e is the name of a procedure whose formal parameters match
  606.     those of Tv.
  607. Array compatible
  608. An actual parameter a of type Ta is array compatible with a formal parameter f of type Tf if
  609. 1.  Tf and Ta are the same type, or
  610. 2.  Tf is an open array, Ta is any array, and their element types are array compatible, or
  611. 3.  Tf is ARRAY OF CHAR and a is a string.
  612. Expression compatible
  613. For a given operator, the types of its operands are expression compatible if they conform to the following table (which shows also the result type of the expression). Character arrays that are to be compared must contain 0X as a terminator. Type T1 must be an extension of type T0:
  614. operator     first operand    second operand     result type
  615. + - *    numeric    numeric    smallest numeric type
  616.             including both operands
  617. /    numeric    numeric    smallest real type
  618.             including both operands
  619. + - * /    SET    SET    SET
  620. DIV MOD    integer    integer    smallest integer type
  621.             including both operands
  622. OR & ~    BOOLEAN    BOOLEAN    BOOLEAN
  623. = # < <= > >=    numeric    numeric    BOOLEAN
  624.     CHAR    CHAR    BOOLEAN
  625.     character array, string    character array, string    BOOLEAN
  626. = #    BOOLEAN    BOOLEAN    BOOLEAN
  627.     SET    SET    BOOLEAN
  628.     NIL, pointer type T0 or T1    NIL, pointer type T0 or T1    BOOLEAN
  629.     procedure type T, NIL    procedure type T, NIL    BOOLEAN
  630. IN    integer    SET    BOOLEAN
  631. IS    type T0    type T1    BOOLEAN
  632. Matching formal parameter lists
  633. Two formal parameter lists match if
  634. 1.  they have the same number of parameters, and
  635. 2.  they have either the same function result type or none, and
  636. 3.  parameters at corresponding positions have equal types, and
  637. 4.  parameters at corresponding positions are both either value or variable parameters.
  638. Appendix B: Syntax of Oberon/L
  639. Module     =    MODULE ident ";" [ImportList] DeclSeq  [BEGIN StatementSeq] END ident ".".
  640. ImportList     =    IMPORT [ident ":="] ident {"," [ident ":="] ident} ";".
  641. DeclSeq     =    { CONST {ConstDecl ";" } | TYPE {TypeDecl ";"} | VAR {VarDecl ";"}}
  642.             {ProcDecl ";" | ForwardDecl ";"}.
  643. ConstDecl    =    IdentDef "=" ConstExpr.
  644. TypeDecl    =    IdentDef "=" Type.
  645. VarDecl    =    IdentList ":" Type.
  646. ProcDecl     =    PROCEDURE [Receiver] IdentDef [FormalPars] ";" DeclSeq
  647.             [BEGIN StatementSeq] END ident.
  648. ForwardDecl    =    PROCEDURE "^" [Receiver] IdentDef [FormalPars].
  649. FormalPars     =    "(" [FPSection {";" FPSection}] ")" [":" Qualident].
  650. FPSection     =    [VAR] ident {"," ident} ":" Type.
  651. Receiver    =    "(" [VAR] ident ":" ident ")".
  652. Type     =    Qualident
  653.         |  ARRAY [ConstExpr {"," ConstExpr}] OF Type 
  654.         | RECORD ["("Qualident")"] FieldList {";" FieldList} END
  655.         | POINTER TO Type
  656.         | PROCEDURE [FormalPars].
  657. FieldList     =    [IdentList ":" Type].
  658. StatementSeq    =    Statement {";" Statement}.
  659. Statement     =    [ Designator ":=" Expr 
  660.         | Designator ["(" [ExprList] ")"] 
  661.         | IF Expr THEN StatementSeq {ELSIF Expr THEN StatementSeq}
  662.             [ELSE StatementSeq] END 
  663.         | CASE Expr OF Case {"|" Case} [ELSE StatementSeq] END 
  664.         | WHILE Expr DO StatementSeq END 
  665.         | REPEAT StatementSeq UNTIL Expr 
  666.         | FOR ident ":=" Expr TO Expr [BY ConstExpr] DO StatementSeq END 
  667.         | LOOP StatementSeq END
  668.         | WITH Guard DO StatementSeq {"|" Guard DO StatementSeq}
  669.             [ELSE StatementSeq] END
  670.         | EXIT 
  671.         | RETURN [Expr]
  672. Case     =    [CaseLabels {"," CaseLabels} ":" StatementSeq].
  673. CaseLabels     =    ConstExpr [".." ConstExpr].
  674. Guard    =    Qualident ":" Qualident.
  675. ConstExpr    =    Expr.
  676. Expr     =    SimpleExpr [Relation SimpleExpr].
  677. SimpleExpr    =    ["+" | "-"] Term {AddOp Term}.
  678. Term     =    Factor {MulOp Factor}.
  679. Factor     =    Designator
  680.             ["(" [ExprList] ")"] | number | character | string | NIL | Set | "(" Expr ")" |
  681.             " ~ " Factor.
  682. Set    =    "{" [Element {"," Element}] "}".
  683. Element     =    Expr [".." Expr].
  684. Relation     =    "=" | "#" | "<" | "<=" | ">" | ">=" | IN | IS.
  685. AddOp     =    "+" | "-" | OR.
  686. MulOp     =    " * " | "/" | DIV | MOD | "&".
  687. Designator     =    Qualident {"." ident | "[" ExprList "]" | " ^ " | "(" Qualident ")"}.
  688. ExprList     =    Expr {"," Expr}.
  689. IdentList     =    IdentDef {"," IdentDef}.
  690. Qualident     =    [ident "."] ident.
  691. IdentDef     =    ident [" * " | "-"].
  692. Appendix
  693. Domains
  694. Basic
  695. Types
  696. Type    Domain
  697. BOOLEAN    FALSE, TRUE
  698. CHAR    0X .. 0FFX
  699. SHORTINT    -128 .. 127
  700. INTEGER    -32768 .. 32767
  701. LONGINT    -2147483648 .. 2147483647
  702. REAL    32-bit IEEE format
  703. LONGREAL    64-bit IEEE format
  704. SET    set of 0 .. 31
  705. TextControllers.StdCtrlDesc
  706. TextControllers.ControllerDesc
  707. Containers.ControllerDesc
  708. Controllers.ControllerDesc
  709. Helvetica
  710. Documents.ControllerDesc
  711.